<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\api\service\ShopService;

class Shop extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 轮播图
     *
     */
    public function banner()
    {
        $res = ShopService::getBanner();
        return json($res);
    }

    /**
     * 轮播图
     *
     */
    public function navigation()
    {
        $res = ShopService::getNavigation();
        return json($res);
    }

    /**
     * 商品列表
     *
     */
    public function goods_list()
    {
        $data = $this->request->post();
        $res = ShopService::getGoodsList($data);
        return json($res);
    }

    /**
     * 为你推荐
     *
     */
    public function recommend()
    {
        $data = $this->request->post();
        $res = ShopService::getRecommendList($data);
        return json($res);
    }

    /**
     * 商品详情
     *
     */
    public function goods_details()
    {
        $data = $this->request->post();
        $res = ShopService::getGoodsDetails($data);
        return json($res);
    }
}